package com.bigbee.io;

import java.io.File;
import java.io.RandomAccessFile;

public class FileClass {
	public static void main(String[] args) {
		File file = new File("F:\\aaaa.txt");
		try {
			/*file.createNewFile();//创建文件
			if(file.exists()){
				file.delete();
			}else{
				System.out.println("文件不存在！");
			}
			file.mkdir();//创建文件夹*/
			RandomAccessFile raf = new RandomAccessFile(file,"rw");
			raf.writeBytes("fadasdsadasd");
			raf.writeInt(12);
			raf.writeBoolean(true);
			raf.writeChar('A');
			raf.writeFloat(1.21f);
			raf.close();
		} catch (Exception e) {
			// TODO: handle exception
			e.getStackTrace();
		}
	}
}
